package com.easylinkin.linkappapi.facerecognition.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.Date;
import java.util.List;

@Data
@TableName("linkapp_personnel")
public class Personnel {

    @TableId(type = IdType.AUTO)
    private Long id;

    @NotEmpty(message = "人员姓名不能为空")
    @TableField("name")
    private String name;

    @NotNull(message = "人员身份不能为空")
    @TableField("identifier_id")
    private Long identifierId;

    private transient String identifierName;

    private transient String color;

    @TableField("subject_id")
    private String subjectId;

    @TableField("tenant_id")
    private String tenantId;

    @TableField("photo_url")
    private String photoUrl;

    /**
     * 关联账户
     */
    @TableField("username")
    private String username;

    @TableField(exist = false)
    private List<String> photoList;

    @TableField("gender")
    private Integer gender;

    @TableField(value = "phone", strategy = FieldStrategy.IGNORED)
    private String phone;

    @TableField(value = "email", strategy = FieldStrategy.IGNORED)
    private String email;

    @TableField(value = "department", strategy = FieldStrategy.IGNORED)
    private String department;

    @TableField(value = "title", strategy = FieldStrategy.IGNORED)
    private String title;

    @TableField(value = "remarks", strategy = FieldStrategy.IGNORED)
    private String remarks;

    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @TableField("create_time")
    private Date createTime;


}
